num1=float(input("输入第1个数:"))
num2=float(input("输入第2个数:"))
num3=float(input("输入第3个数:"))
maxnum=num1 if num1>=num2 and num1>=num3 else num2 if num2>=num1 and num2>=num3 else num3
secondmaxnum=num1 if num2<=num1<=num3 or num3<=num1<=num2 else num2 if num1<=num2<=num3 or num3<=num2<=num1 else num3
minnum=num1 if num1<=num2 and num1<=num3 else num2 if num2<=num1 and num2<=num3 else num3
print(minnum)
print(secondmaxnum)
print(maxnum)
print("-------------")
maxnum=num1>=num2 and num1>=num3 and num1 or num2>=num1 and num2>=num3 and num2 or num3
secondmaxnum=(num2<=num1<=num3 or num3<=num1<=num2) and num1 or ((num1<=num2<=num3 or num3<=num2<=num1) and num2 or num3)
#有时候num2,num3为负数会出问题,而全为正数没问题，不知道什么情况
minnum=num1<=num2 and num1<=num3 and num1 or num2<=num1 and num2<=num3 and num2 or num3
print(minnum)
print(secondmaxnum)
print(maxnum)
print("-------------")
maxnum=max(num1,num2,num3)
minnum=min(num1,num2,num3)
print(minnum)
print(secondmaxnum)
print(maxnum)
